﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DanhSachSanPham.ascx.cs" Inherits="Controls_DanhSachSanPham" %>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
    <HeaderTemplate>
        <div class="row padd50">
            <div class="panel">
                <div class="panel-heading panel-icon">
                    <h2 class="panel-title">Danh Sách Sản Phẩm</h2>
                </div>
                <div class="row">
    </HeaderTemplate>
    <ItemTemplate>
        <div class="col-xs-6 col-sm-4 col-md-4 padd-product">
            <div class="col-item">
                <div class="photo-product">

                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("MaSP", "../Product-Detail.aspx?masp={0}") %>'>
                        <asp:Image ID="Image2" runat="server" CssClass="img-responsive"
                            ImageUrl='<%# "~/"+Eval("Hinhanh") %>'
                            ToolTip='<%# Eval("TenSP") %>' />
                    </asp:HyperLink>

                </div>
                <div class="info">
                    <div class="row">
                        <div class="price col-md-12">
                            <div class="product-title-main">
                                <asp:HyperLink ID="HyperLink4" runat="server" CssClass="product-title"
                                    NavigateUrl='<%# Eval("MaSP", "../Product-Detail.aspx?masp={0}") %>'
                                    Text='<%# Eval("TenSP") %>'></asp:HyperLink>
                            </div>
                            <h5 class="price-text-color">
                                <asp:Label ID="Label1" runat="server" Text='<%#Eval("Gia","{0:0,00} ₫")%>'></asp:Label>
                            </h5>
                        </div>
                    </div>
                    <div class="separator">
                        <p class="btn-details">
                            <asp:HyperLink ID="MuaNgay" runat="server" NavigateUrl='<%# Eval("MaSP", "../Product-Detail.aspx?masp={0}") %>'><i class="glyphicon glyphicon-shopping-cart"></i>Mua Ngay</asp:HyperLink>
                        </p>
                    </div>
                    <div class="clearfix">
                    </div>
                </div>
            </div>
        </div>
    </ItemTemplate>

    <FooterTemplate>
        </div>
            </div>
        </div>

    </FooterTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
    SelectCommand="SELECT * FROM [SanPham] WHERE ([MaLoai] = @MaLoai)">
    <SelectParameters>
        <asp:QueryStringParameter QueryStringField="maloai" Name="MaLoai" Type="Int32"></asp:QueryStringParameter>
    </SelectParameters>
</asp:SqlDataSource>
